LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := StandaloneASM

ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
    LOCAL_SRC_FILES := armv7_asm.s.neon
    LOCAL_ARM_NEON := true
    LOCAL_CFLAGS += -march=armv7-a
else
ifeq ($(TARGET_ARCH_ABI), arm64-v8a)
    LOCAL_SRC_FILES := arm64_asm.s
    LOCAL_CFLAGS += -DARCH_ARM64=1
    LOCAL_CFLAGS += -march=armv8.5a+aes+sha3+fp16fml+sm4
else
ifeq ($(TARGET_ARCH_ABI), x86_64)
    LOCAL_SRC_FILES := x86_asm.s
endif
endif
endif

LOCAL_STATIC_LIBRARIES := cpufeatures

#LOCAL_LDLIBS := -llog
LOCAL_STATIC_LIBRARIES += log

#include $(BUILD_SHARED_LIBRARY)
include $(BUILD_STATIC_LIBRARY)

$(call import-module, android/cpufeatures)
